<template>
	<el-drawer title="巡检记录详情" v-model="visible" :size="600" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-row :gutter="24">
					<el-col :lg="24">
						<el-form-item label="巡检标题" prop="title">{{form.title}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="库房编号" prop="roomNumber">{{form.roomNumber}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="巡检类型" prop="patrolTypeName">{{form.patrolTypeName}}</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="巡检人员" prop="patrolUserName">{{form.patrolUserName}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="巡检时间" prop="patrolTime">{{form.patrolTime}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-form-item label="备注说明" prop="remark">{{form.remark}}</el-form-item>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>
<script>


export default {
	emits: ['success', 'closed'],
	data() {
		return {
			visible: false,
			isSaveing: false,
			loading:false,
			//所需数据选项
			form: {
				recordId:'',
				title: '',
				roomNumber: '',
				patrolTypeName: '',
				patrolUserName:'',
				patrolTime:'',
				remark: '',
			}
		}
	},
	mounted() {
	},
	methods: {
		open() {
			this.visible = true;
			return this
		},
		setData(data) {
			this.form.recordId = data.recordId
			this.form.roomNumber = data.roomNumber
			this.form.title = data.title
			this.form.patrolTypeName = data.patrolTypeName
			this.form.patrolTime =data.patrolTime
			this.form.patrolUserName = data.patrolUserName
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
.customWidth {
	width: 60%;
}
</style>
